package com.leetcode.LC;

import java.util.Stack;

public class LC739 {
    public int[] dailyTemperatures(int[] T) {
        int[] ints = new int[T.length];
        int times = 0, i = 1;
        Stack<Integer> intStack = new Stack<Integer>();
        intStack.push(T[0]);

        return ints;
    }

    public int[] dailyTemperatures2(int[] T) {
        int[] ints = new int[T.length];
        int times = 0;

        for (int i = 0; i < T.length; i++) {
            times = 1;
            for (int j = i + 1; j < T.length; j++) {
                if (T[j] <= T[i]) {
                    times++;
                } else {
                    ints[i] = times;
                    break;
                }
            }
        }
        return ints;
    }

    public static void main(String[] args) {
        for (int i : new LC739().dailyTemperatures2(new int[]{73, 74, 75, 71, 69, 72, 76, 73})) {
            System.out.print(i + ",");
        }
    }
}
